Output 9 digits after decimal instead of default of 6 for wpt and bounding
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 29 Jul 2004 16:27:32 +0000 (16:27 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Thu, 29 Jul 2004 16:27:32 +0000 (16:27 +0000)
box.

gpsbabel/gpx.c

index 7d70bcdedf7f13c9e4eecc08d92f0d4a9b7340b1..d070f03bc987a071cb7b0beb479a92e7c02216f7 100644 (file)
@@ -1127,7 +1127,7 @@ gpx_waypt_pr(const waypoint *waypointp)
                                  mkshort(mkshort_handle, odesc) : 
                                  waypointp->shortname;
 
-       fprintf(ofd, "<wpt lat=\"%lf\" lon=\"%lf\">\n",
+       fprintf(ofd, "<wpt lat=\"%0.9lf\" lon=\"%0.9lf\">\n",
                waypointp->latitude,
                waypointp->longitude);
        if (waypointp->creation_time) {
@@ -1271,8 +1271,8 @@ gpx_write(void)
        gpx_write_time( now, "time" );
        waypt_compute_bounds(&bounds);
        if (bounds.max_lat  > -360) {
-               fprintf(ofd, "<bounds minlat=\"%f\" minlon =\"%f\" "
-                              "maxlat=\"%f\" maxlon=\"%f\" />\n",
+               fprintf(ofd, "<bounds minlat=\"%0.9f\" minlon =\"%0.9f\" "
+                              "maxlat=\"%0.9f\" maxlon=\"%0.9f\" />\n",
                               bounds.min_lat, bounds.min_lon, 
                               bounds.max_lat, bounds.max_lon);
        }